check for nulls if the flag was given