CR changes: instead of casting object to array return array with an exception instance