checking beacon nil before stop ranging