Added extra tests incase bean null.