Checks state definition and port definition