This piece of code occurs at least three times in the code base, it probably means that we should create a utility method for it.