add null check due to powerhell qwerk