corrected attendance form to fix check for an empty array