Type test & refactor

Added test to type exclusion and little bit of refactoring to throw
errors in grunt whenever they happen.