fix edge case by using .present? instead of attribute? method