Avoiding null binding exceptions