Check for existence of trait and trigger a more meaningful notice than 'Undefined index' (see #234)