Add access type checking

/to @raymondfeng