Add missing validation which results in NPE later