Added checking if method is null before getting the mid

Reviewer: tiff go

Issue : none