Added some null check to methods using world