Throw exception if detects coderef in the arrayref.