added checking for null result after call to type.FindMethodByName