null check on location