Improve empty value check.