added primitive check