added helper function to forms to ease with checking unique keys