Added ability to pass None as argument to the objective version of the function definition.