Strict type checking and general type handling improvements.