getOfOrNull
Utility function for getting a key from the given String-keyed map, attempting to cast it to the given generic type, T. Will return null if the key is missing or the value cannot be cast.
Note: This function does not support maps with nullable values.