Use is_record/2 in guards instead of element(1, X)

Now, we are recommended not to relay on tuple representation of records.