Fixing bugg with failing tests
Fix possible null pointer exception in validation