Downcast any objects to a specified typed map safely.
A typed map if the object inherits the specified map type, or null otherwise.