This is broken if you pass a wrong class as it will return ``null``, and throw a fatal error just after when reading the metadata