Remove unnecessary hasattr all and add comment for nested relationships