LPS-46975 getResource can return null
LPS-46975 Fix other cases?