move is_null to a free funvtion
using inherits free function