better sanity checks for commands