Added validation

Thanks to @outbounder the quick fix is done :)