Implement and test validation of handle key.