Avoid exception with hackish conditional