Minor nil check fix