Mkaing sure warnings are raised before checking type