See How to distinguish between value type and reference type?
Checking if an object is a value type vs a reference type isn't as useful as it seems, as there are values with reference semantics (e.g. a struct storing a reference to a shared mutable object) and referenced objects with value semantics (e.g. an immutable class instance with only other values as fields).
What you're probably looking for is the ability to tell if something has value semantics or reference semantics (and treat it differently based on that). The rules there are pretty nuanced/complicated (e.g. is a thread-safe, lazy loaded value a value or a reference? Depends on what you're looking for.)