Fixed form presence checker in the_form to make sure that form is an object not just not null