LPS-45115 Preventing a NullPointerException