EMBRYO-415: Avoided NullPointerException by defensive programming