fix when m is null，add attribute throw error bug