Added proper typecasting for getPrecondition and getTransition