fixed empty value check