Improve register validation