Implemented hasWarnings function.