Added a not null ascertaiment in a cecking connection function