Added null and empty checks !