Fixes return type for validator error check