Move string error asserts to separate header file