helper method to validate int64