avoid NPE in state comparat