added convenience methods for consistently checking and error reporting