BertEncoder head_mask not subscript-able error when not passed
## 🐛 Bug

BertEncoder takes in head_mask parameters with default value of None but on https://github.com/huggingface/pytorch-transformers/blob/master/pytorch_transformers/modeling_bert.py#L431, ith index is checked without checking if head_mask is None. If by default nothing is passed this results in error.

## Fix
Check head_mask is not None in https://github.com/huggingface/pytorch-transformers/blob/master/pytorch_transformers/modeling_bert.py#L431
Got same issue. If no `head_mask` is given to `.forward` method of `BertEncoder`, then the following code will cause `TypeError: 'NoneType' object is not subscriptable`.

https://github.com/huggingface/transformers/blob/a701c9b32126f1e6974d9fcb3a5c3700527d8559/transformers/modeling_bert.py#L348

I wonder if there will be a case of using `BertEncoder` without any `head_mask`. Though, this issue should be addressed by checking whether `head_mask` is None, and expand them as size `[config.num_hidden_layers]`.<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
<|||||>As bot closed the issue and it is still existing, I provided a fix it in the PR linked above.