Fix NPE in - cast