Best practice to pass object than to check for optional parameter value