Fix issue with error validation (NoMethodError macro for nil class)