Fix attribute type checking.