Revert "avoid NPE"

This reverts commit 2a86063e4036eb644150c5bd88e266123ce349a1.