Trying to throw error when named_map is null