This function returns true if a call is valid with a given state.
