Lets say you are coding a function that takes input from an external API
That external API
MyAPI has a contract that states it will return a
string or a
Is it recommended to guard against things like
boolean, etc. even though it's not part of the API of
MyAPI? In particular, since you have no control over that API you cannot make the guarantee through something like static type analysis so it's better to be safe than sorry?
I'm thinking in relation to the Robustness Principle.