Powershell If Variable Is Not Null Sql Command Not Properly Ended