Check if the code is a proper integer before comparison