[TIMOB-13274] Added unknown error checking after converting to primitive