Fix NullPointerException when using pointTo