Added type check to GPermission public functions.