Don't pass null values in forms

Related to #2513