fix broken tests - mainly null checking problems with invalid data supplied