fixed some cases in which null_types were left over in the final code