Added some null checking after i got a null reference