Avoid npe + fix name validator