replaced empty() with isset() to avoid parsing zeroes as empty value