Ensure variable passed in correctly