Wrapping packge and class definitions in defined checks