adding check for empty param