check whether command[0] isn't null first