a posteriory simple type checking for js