changed from length comparison to null