Made type an optional argument in HaveAttributeMatcher