如何避免这种NullPointerException

如何避免这种NullPointerException