Check input is not null before insert.