Type checking is done at compile time, and attempting to access a nonexistent field will cause a compiler error. This gives programmers much of the convenience of a dynamic language, with the type safety of a statically typed language.
Type checking occurs before the code is compiled, and attempting to access a non-existent attribute will cause a compilation mistake. As a result, programmers can take advantage of many of the advantages of a dynamically-typed language while still benefiting from the security features of a statically-typed language in their development process.