Fixed possible errors with nil arguments.