Move pointer usage after pointer check