[fix]
- fixing the code - need to check for nil not empty