Check for valid locals
Pass in dummy function in templates