Fixed crash when passing a null pointer