type checking code bricks for JavaScript