Fixing crash on null map