added check for empty value