Checks if command is at the beginning of a string