Added some helper methods to check commands

Solves #14 , please review.