feat: added traits() and hasTraits() functions
#357
Merged
traits() and hasTraits() functions
#357