Added null/empty check