Removed whitespace before is
Added in protected functions in place of comparison operators for better unit testing
Moved default: and '==' comparison to bottom to make more readable