some checks if some keys exist in a map before using them