Adding safeInt checks