@christianv activeSupport has this nice thing built into all objects call `.try`. You could simplify the if clause into something like "student_info.try(:[], "cum_gpa").nil?"