Fix crash with empty attribute list
Remove redundant check