avoid null string in path