I have methods in a custom controller that I want to access without user input through apex but I get a null pointer exception on this line objectType = ApexPages.currentPage().getParameters().get('objType'); I was able to do what I am describing when coming from a batch process by simply wrapping pieces of the controller using apexpages in if(!system.isBatch()){}. What could I add to this if statement to bypass when there is no page being passed in?