null check of location