There is some good practice, standardization, recommendation, etc. that aims to prevent invalid types from being passed to methods and functions?
If I'm working alone, it's calmer, I wrote the method myself so I know what kind of parameters it expects to receive, but I see a problem when the development happens to be as a team. How will a third one know if for a given method it must pass an integer or a string, whether it should be a list, or some other object whatsoever? Only at runtime?
The only trick I see is to make massive use of docstrings and use an editor with the docstring feature when writing a call to a method. >
Any other alternative besides this?