https://www.mybluelinux.com/how-validate-object-attributes-in-python/