Added an `hasattr` condition to the owner check in a new commit.