use better checks for dependency arguments to avoid accidental initialization of resources.