Adding return to prevent function from running if map isn't init