Avoid NPE in hashcode generation of nullables