adding empty check