Fix a bug with optional parameters when the parameter is explicitly set to null