Added in error checking

Needed error checking so it won't try to alter a form element that
doesn't exist