Fixing NPE on validation of missing field