fix to handle 'None' passed as a parameter from python.