Reduce output code in class guard