Check for null arguments when creating a command