Check for null map before updating