support nil argument for method expect object