added true type validation through error objects