added generic makesure method that uses the same syntax as require