module T::Utils
def self.unwrap_nilable(type)
Give a type which is a subclass of T::Types::Base, determines if the type is a simple nilable type (union of NilClass and something else).
def self.unwrap_nilable(type) case type when T::Types::Union type.unwrap_nilable else nil end end